home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
130 MIDI Tool Box
/
130 MIDI Tool Box.iso
/
sda_ur22
/
sda_user.doc
< prev
next >
Wrap
Text File
|
1988-05-10
|
9KB
|
269 lines
Software User Interface to the Promidi System, SDA-200.
Systems Design Associates, Inc.
5068 Plano Parkway, Suite 121
Plano, TX 75075
214/ 248-8530
Revision: 1.0 TSR access to the Midicard(tm)
Release Date: 11-11-86
Software: D 1.0 and above.
Revision: 2.0 adds freestanding UART access
Release Date: 07-29-87
Software: D 1.1 and above.
Revision: 2.1 adds UART capability to the TSR mode
Release Date: 10-22-87
Software: D 1.2 and above
Revision: 2.2
Release Date: 04-19-88 Added support for 16MZ AT's.
Software: D 1.2 and above Added MPU mode support for Midicard Expander
***************** NOTICE ********************
To use the stand-alone routines, a Z8.HEX file dated 7-29-87 or later
must be substituted for any earlier one. Such newer Z8.HEX files are
compatible with all versions of Promidi. To use UART in the TSR mode
the Z8.HEX must be dated 10-22-87 or later.
Systems Design Associates, Inc. Z8.HEX files are NOT in the Public Domain.
All Z8.HEX files are a product part of the Promidi System.
The furnishing to any independent developer of any such component part of
the Promidi System by SDA or its authorized representatives, should such be
done, is intended only as a convenience to such independent developers
and in no way abrogates the rights, commercial or otherwise, of Systems
Design Associates, Inc.
The source files 'SDA_USR1.ASM'and SDA_USR2.ASM are provided free of
charge by Systems Design Associates, Inc. SDA in no way warrants
this software nor is it liable for any damages resulting from its use.
The use of these routines by any independent developer signifies that he
understands and agrees to these conditions and limitations.
*********************************************
This document is intended to describe the Promidi Software User
Interface as it pertains to memory resident and stand-alone software.
Both this document and the accompanying source files of IBM assembly
language subroutines (SDA_USR1.ASM and SDA_USR2.ASM), are in the
public domain. This growing collection of subroutines is intended
to provide designers access into a running Promidi system (in the
case of TSR software) or the Midicard interface (in the case of
stand-alone software).
The first part of this document is intended to provide specific
information to designers who are already familiar with IBM-PC
"Terminate-and-Stay-Resident" software design.
The second part provides information on the software in "SDA_USR2.ASM".
This software will communicate with the Midicard interface directly,
without Promidi software being in memory.
The subroutines in 'SDA_USR1.ASM' and 'SDA_USR2.ASM', while provided
in IBM MASM assembler format, are callable as C Functions when
linked with Microsoft C (versions 3.0 and greater) modules. Whether called
from C or assembler language, they are FAR routines. If NEAR calls
are desired, or if for instance the designer wishes to pass and return
parameters differently, the source may be modified accordingly.
PART 1
TERMINATE AND STAY RESIDENT SOFTWARE SUPPORT.
Memory Resident Software Requirements.
PC-DOS (MS-DOS) 2.0 or later is required.
384 K. Bytes (plus the memory necessary for the resident software) is
required.
The software should be installed before Promidi is run.
The software should get control by intercepting INT 16 (The keyboard
I/O call) and looking for an ALT key (Promidi does not use ALT keys),
but only if AH is 0, that is, Promidi is actually reading (not
testing for) a keystroke.
Promidi does not use graphics modes in any of its screens, therefore
saving the screens is relatively straightforward. In the future, SDA
intends to provide a general-purpose 'screen redraw' subroutine to be
used at the end of the user interrupt.
The software should return the ALT key to Promidi at the end of the
interrupt. If this is not done, upon returning to Promidi, the user
will have to hit an "extra" keystroke.
The software should also exit with interrupts enabled, else a "red
switch" restart will be required.
Calls into Promidi require only 40 bytes of user stack space
(maximum). Promidi's stacks are used for all operations.
Saving Promidi's Data Segment (DS register).
Upon each entrance to the memory resident software (through INT 16),
when saving Promidi's context, the contents of Promidi's DS register
must be saved in '_SDA_DSEG' (public in SDA_USR1.ASM).
Checking for The Midicard Interface.
Upon each entrance to the memory resident software (through INT 16), the
subroutine '_CHECK4_SDA' must be called SUCCESSFULLY. This routine
performs two functions:
1. It tests for and locates a running SDA Midicard Interface.
2. It run-time binds the memory resident software to Promidi.
If this routine does not complete successfully (see subroutine header in
'SDA_USR1.ASM'), no other Promidi subroutines should be called.
SDA_USR1.ASM - LIST OF USER SUBROUTINES.
Output.
_SDA_PUTB - Send a byte (of a complete Midi message) out Midi Out.
Input.
_SDA_RECON - Go into record mode.
This routine must be called before any input can be received via
the Midicard Interface. It has three functions:
1. It checks to see if Promidi is currently recording. If so, no
user recording can be done.
2. It allocates a record buffer within Promidi (the number of
bytes are returned from the call). This buffer will usually
be about 40K bytes.
3. It tells the Midicard to start sending data to Promidi.
_SDA_RECOFF - Leave record mode.
This routine must be called (if _SDA_RECON was called) before the
memory resident software terminates (returns from INT16).
** Failure to do so will result in the loss of the record buffer. **
_SDA_GETB - Get a byte of a complete Midi message from the record
buffer.
General.
_SDA_EXEC - Runs other Promidi Tasks.
If the memory resident software needs to run while Promidi is
recording and/or playing, frequent calls to _SDA_EXEC are necessary
to keep the record playback process 'alive'. A call every 15 or 20
milliseconds is usually sufficient to keep the Midicard supplied
with data (playback).
Notes on The TSR Environment.
Promidi only reads keyboard characters (INT 16, AH=0) from one of its
tasks. The memory resident software, even though it accessed as an
interrupt, becomes an extension of that task when it uses Promidi
services via the SDA_USER subroutines. That task does not do disk I/O.
To keep disk I/O active during Promidi's record or playback, calls to
_SDA_EXEC are required.
PART 2
STAND-ALONE SOFTWARE FOR THE MIDICARD.
The stand-alone software in SDA_USR2.ASM is intended to provide access to
a downloaded Systems Design Midicard so it may be used in UART mode.
The Midicard will then send all send all data received from Midi IN to
the host PC and will send all data from the host out MIDI OUT. There is
no direct flow of data from MIDI IN to MIDI OUT (MIDI THRU) in the
Midicard in UART mode. THRU capabilities must be handled by the host in
this mode.
These routines are NOT designed to be memory resident with a running
Promidi system. Routines that provide services for memory co-resident
software (TSR) are provided as public domain 8086 assembly source in
"SDA_USR1.ASM".
The following requirements must be satisfied before data may be sent
and received from a Midicard:
1. The Midicard must be downloaded.
The loader program is MLOAD.EXE and the Midicard's software
is in file Z8.HEX. Both of these programs are supplied with
with every Promidi System. Before Promidi can run, the
command line "MLOAD Z8" is executed (from BATCH file SDA.BAT).
Once the Midicard's program has been downloaded, it is intact
until the PC is powered down. The same "MLOAD Z8" may be used
in any batch file to download the Midicard.
2. The Midicard must be located and initialized.
A file called SDA.CFG must be in the same directory as MLOAD.EXE
and Z8.HEX. This file contains (along with other data) the
switch settings set by the user at installation to position the
card in the PC's I/O space and assign it one of four interrupt
addresses.
The provided routine "_U_LOC_MC" is used to locate and init.
the Midicard.
After these requirments have been satisfied, the I/O routines may be called.
Before terminating, the software should ALWAYS call _U_EXIT which will reset
(deactivate) the Midicard.
SDA_USR2.ASM - LIST OF USER SUBROUTINES.
Output.
_U_SNDB - Send a byte out MIDI Out.
Input.
_U_RCVB - Get a byte from MIDI In.
_U_TRCV - Test for a byte from MIDI In.
Entry.
_U_LOC_MC - Locates and initializes the Midicard.
Exit.
_U_EXIT - Resets the Midicard on program termination.